﻿
@model SIG.Model.ViewModel.Identity.SetPasswordVM

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="exampleModalLabel">重设密码</h4>
            </div>

            @using (Ajax.BeginForm("SetPassword", null, new AjaxOptions
        {
            InsertionMode = InsertionMode.Replace,
            HttpMethod = "Post",
            OnSuccess = "SetPasswordSuccess"
        }, new { role = "form" }))
            {
                <div class="modal-body">

                    @Html.AntiForgeryToken()
                    @Html.ValidationSummary(true, "", new { @class = "text-danger" })

                    @Html.HiddenFor(model => model.UserId)

                    <div class="form-group">
                        @Html.LabelFor(model => model.NewPassword)

                        @Html.PasswordFor(model => model.NewPassword, new { @class = "form-control" })
                        @Html.ValidationMessageFor(model => model.NewPassword, "", new { @class = "text-danger" })

                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.ConfirmPassword)

                        @Html.PasswordFor(model => model.ConfirmPassword, new { @class = "form-control" })
                        @Html.ValidationMessageFor(model => model.ConfirmPassword, "", new { @class = "text-danger" })
                    </div>

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="submit" class="btn btn-primary">重设密码</button>
                </div>
            }
        </div>
    </div>
</div>
